package com.example.canvastest;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    private Intent mIntent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mIntent = new Intent(this, MyViewTest.class);//指明跳转方向
    }

    public void btndrawRect_stroke_and_fill(View view) {
        mIntent.putExtra("flag", 0);//附加数据，“暗号”为flag
        startActivity(mIntent);//跳转
    }

    public void drawPoint(View view){
        mIntent.putExtra("flag", 1);
        startActivity(mIntent);
    }

    public void drawLine_and_Lines(View view){
        mIntent.putExtra("flag", 2);
        startActivity(mIntent);
    }

    public void drawRoundRect(View view){
        mIntent.putExtra("flag",3);
        startActivity(mIntent);
    }

    public void drawCircle(View view){
        mIntent.putExtra("flag", 4);
        startActivity(mIntent);
    }

    public void drawArc(View view){
        mIntent.putExtra("flag", 5);
        startActivity(mIntent);
    }

    public void drawOval_drawPath(View view){
        mIntent.putExtra("flag", 6);
        startActivity(mIntent);
    }

    public void drawText_drawPosText(View view){
        mIntent.putExtra("flag", 7);
        startActivity(mIntent);
    }

    public void Multipledemo(View view){
        mIntent.putExtra("flag",8);
        startActivity(mIntent);
    }

    public void SignalLightView(View view){
        Intent intent = new Intent(this, SignalViewTest.class);
        startActivity(intent);
    }

}
